home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / tptc17sc.zip / KEYPRESS.INC < prev    next >
Text File  |  1988-03-25  |  502b  |  23 lines

  1.  
  2.    (* -------------------------------------------------------- *)
  3.    function ReadKey: Char;
  4.    var
  5.       reg: registers;
  6.    begin
  7.       reg.ax := $0700;   {direct console input}
  8.       msdos(reg);
  9.       ReadKey := chr(reg.al);
  10.    end;
  11.  
  12.  
  13.    (* -------------------------------------------------------- *)
  14.    function KeyPressed: Boolean;
  15.    var
  16.       reg: registers;
  17.    begin
  18.       reg.ax := $0b00;   {ConInputStatus}
  19.       msdos(reg);
  20.       KeyPressed := (reg.al = $FF);
  21.    end;
  22.  
  23.